import request from "@/utils/request"

/**
 * 添加评论
 */
export function addGoodsComment(data) {
  return request.post('/product-replies/add', data)
}

/**
 * 分页获取评论
 */
export function getCommentPage(params) {
  return request.get('/product-replies/get-page', { params })
}

/**
 * 获取评论详情
 */
export function getCommentInfo(id) {
  return request.get(`/product-replies/get-by-id/${id}`)
}

/**
 * 分页获取推荐评论
 */
export function getRecommendPage(params) {
  return request.get('/product-replies/get-recommend-page', { params })
}

/**
 * 分页获取订单评论
 */
export function getByOrderIdPage(id) {
  return request.get(`/product-replies/get-by-order-id/${id}`)
}